using System;

namespace Voodoo.Sauce.Internal.SDKs
{
	[Serializable]
	public class AdNetworkPlatform
	{
		public string version;

		public bool certified;

		public Adapter adapter;

		public override bool Equals(object obj)
		{
			if (obj == null || GetType() != obj.GetType())
			{
				return false;
			}
			AdNetworkPlatform adNetworkPlatform = (AdNetworkPlatform)obj;
			if ((version ?? "") != (adNetworkPlatform.version ?? "") || certified != adNetworkPlatform.certified || ((adapter == null || adapter.IsEmpty()) && adNetworkPlatform.adapter != null && !adNetworkPlatform.adapter.IsEmpty()) || (adapter != null && !adapter.Equals(adNetworkPlatform.adapter)))
			{
				return false;
			}
			return true;
		}

		public override int GetHashCode()
		{
			return (((((version != null) ? version.GetHashCode() : 0) * 397) ^ certified.GetHashCode()) * 397) ^ ((adapter != null) ? adapter.GetHashCode() : 0);
		}

		public bool IsEmpty()
		{
			if (string.IsNullOrEmpty(version) && (adapter == null || adapter.IsEmpty()))
			{
				return true;
			}
			return false;
		}
	}
}
